package com.rede.didiok.common.domainEvent;

/**
 * 领域事件实体类型
 */
public enum EventAction {

    // 榜单成员相关
    RANK_MEMBER_ADD("RANK_MEMBER_ADD", "添加榜单成员", EntityType.RANK_MEMBER),
    RANK_MEMBER_EDIT("RANK_MEMBER_EDIT", "编辑榜单成员", EntityType.RANK_MEMBER),
    RANK_MEMBER_DELETE("RANK_MEMBER_DELETE", "删除榜单成员", EntityType.RANK_MEMBER),
    RANK_MEMBER_AUDIT("RANK_MEMBER_AUDIT", "审核榜单成员", EntityType.RANK_MEMBER),
    RANK_MEMBER_PUBLISH("RANK_MEMBER_PUBLISH", "发布榜单成员", EntityType.RANK_MEMBER),
    RANK_MEMBER_ACTIVITY_STATUS_CHANGE("RANK_MEMBER_ACTIVITY_STATUS_CHANGE", "活动取消/恢复正常", EntityType.RANK_MEMBER),
    RANK_MEMBER_VISIT("RANK_MEMBER_VISIT", "榜单成员访问", EntityType.RANK_MEMBER),

    // 动态相关
    MOMENT_ADD("MOMENT_ADD", "添加动态", EntityType.MOMENT),
    MOMENT_EDIT("MOMENT_EDIT", "编辑动态", EntityType.MOMENT),
    MOMENT_DELETE("MOMENT_DELETE", "删除动态", EntityType.MOMENT),
    MOMENT_AUDIT("MOMENT_DELETE", "删除动态", EntityType.MOMENT),
    MOMENT_PUBLISH("MOMENT_PUBLISH", "发布动态", EntityType.MOMENT),

    // 评论相关
    MEMBER_COMMENT_ADD("MEMBER_COMMENT_ADD", "添加榜单成员评论", EntityType.MEMBER_COMMENT),
    MEMBER_COMMENT_EDIT("MEMBER_COMMENT_EDIT", "编辑榜单成员评论", EntityType.MEMBER_COMMENT),
    MEMBER_COMMENT_DELETE("MEMBER_COMMENT_DELETE", "删除榜单成员评论", EntityType.MEMBER_COMMENT),
    MEMBER_COMMENT_AUDIT("MEMBER_COMMENT_AUDIT", "审核榜单成员评论", EntityType.MEMBER_COMMENT),
    MEMBER_COMMENT_PUBLISH("MEMBER_COMMENT_PUBLISH", "发布榜单成员评论", EntityType.MEMBER_COMMENT),

    // 评论相关
    MOMENT_COMMENT_ADD("MOMENT_COMMENT_ADD", "添加用户动态评论", EntityType.MOMENT_COMMENT),
    MOMENT_COMMENT_EDIT("MOMENT_COMMENT_EDIT", "编辑用户动态评论", EntityType.MOMENT_COMMENT),
    MOMENT_COMMENT_DELETE("MOMENT_COMMENT_DELETE", "删除用户动态评论", EntityType.MOMENT_COMMENT),
    MOMENT_COMMENT_AUDIT("MOMENT_COMMENT_AUDIT", "审核用户动态评论", EntityType.MOMENT_COMMENT),
    MOMENT_COMMENT_PUBLISH("MOMENT_COMMENT_PUBLISH", "发布用户动态评论", EntityType.MOMENT_COMMENT),

    // 文件相关
    FILE_ADD("FILE_ADD", "添加文件", EntityType.FILE),
    FILE_EDIT("FILE_EDIT", "编辑文件", EntityType.FILE),
    FILE_DELETE("FILE_DELETE", "删除文件", EntityType.FILE),
    FILE_PUBLISH("FILE_PUBLISH", "发布文件", EntityType.FILE),

    // 签到相关
    SIGN_ADD("SIGN_ADD", "用户签到", EntityType.SIGN_IN),
    RETROACTIVE_ADD("RETROACTIVE_ADD", "用户补签", EntityType.SIGN_IN),

    // 点赞相关
    RANK_PRAISE_ADD("RANK_PRAISE_ADD", "新增点赞", EntityType.RANK_PRAISE),
    RANK_PRAISE_CANCEL("RANK_PRAISE_CANCEL", "取消点赞/踩", EntityType.RANK_PRAISE),
    RANK_TREAD_ADD("RANK_TREAD_ADD", "新增点踩", EntityType.RANK_PRAISE),
    RANK_TREAD_CANCEL("RANK_TREAD_CANCEL", "取消点踩", EntityType.RANK_PRAISE),

    // 点赞相关
    COMMUNITY_PRAISE_ADD("COMMUNITY_PRAISE_ADD", "新增点赞", EntityType.COMMUNITY_PRAISE),
    COMMUNITY_PRAISE_CANCEL("COMMUNITY_PRAISE_CANCEL", "取消点赞/踩", EntityType.COMMUNITY_PRAISE),
    COMMUNITY_TREAD_ADD("COMMUNITY_TREAD_ADD", "新增点踩", EntityType.COMMUNITY_PRAISE),
    COMMUNITY_TREAD_CANCEL("COMMUNITY_TREAD_CANCEL", "取消点踩", EntityType.COMMUNITY_PRAISE),

    // 收藏相关
    COLLECT_ADD("COLLECT_ADD", "新增收藏", EntityType.COLLECT),
    COLLECT_CANCEL("COLLECT_CANCEL", "取消收藏", EntityType.COLLECT),

    // 表情包相关
    EMOTICON_ADD("EMOTICON_ADD", "新增表情包", EntityType.EMOTICON),
    EMOTICON_EDIT("EMOTICON_ADD", "编辑表情包", EntityType.EMOTICON),
    EMOTICON_STICKY("EMOTICON_STICKY", "置顶表情包", EntityType.EMOTICON),
    EMOTICON_DELETE("EMOTICON_DELETE", "删除表情包", EntityType.EMOTICON),

    // 勘误相关
    GENERAL_EDIT_ADD("GENERAL_EDIT_ADD", "新增勘误", EntityType.GENERAL_EDIT),
    GENERAL_EDIT_AUDIT("GENERAL_EDIT_AUDIT", "审核勘误", EntityType.GENERAL_EDIT),
    GENERAL_EDIT_DELETE("GENERAL_EDIT_DELETE", "删除勘误", EntityType.GENERAL_EDIT),

    // 通知相关
    NOTICE_VIEW("NOTICE_VIEW", "阅读通知", EntityType.NOTICE),
    NOTICE_DELETE("NOTICE_DELETE", "删除通知", EntityType.NOTICE),

    // 关注相关
    WATCH_ADD("WATCH_ADD", "增加关注", EntityType.WATCH),
    WATCH_CANCEL("WATCH_CANCEL", "取消关注", EntityType.WATCH),

    // 举报相关
    REPORT_ADD("REPORT_ADD", "添加举报", EntityType.REPORT),
    REPORT_HANDLE("REPORT_HANDLE", "处理举报", EntityType.REPORT),
    REPORT_DELETE("REPORT_DELETE", "删除举报", EntityType.REPORT),

    // 发布聊天
    CHAT_ADD("CHAT_ADD", "发布聊天", EntityType.CHAT),
    CHAT_CANCEL("CHAT_CANCEL", "撤回聊天", EntityType.WATCH),

    // 资源相关
    RESOURCE_ADD("RESOURCE_ADD", "新增资源", EntityType.RESOURCE),
    RESOURCE_EDIT("RESOURCE_EDIT", "编辑资源", EntityType.RESOURCE),
    RESOURCE_DELETE("RESOURCE_DELETE", "删除资源", EntityType.RESOURCE),
    RESOURCE_VISIT("RESOURCE_VISIT", "访问资源", EntityType.RESOURCE),
    RESOURCE_DOWNLOAD("RESOURCE_DOWNLOAD", "下载资源", EntityType.RESOURCE),

    // 消息触达相关
    MESSAGE_PUSH_ADD("MESSAGE_PUSH_ADD", "添加触达", EntityType.MESSAGE_PUSH),
    MESSAGE_PUSH_EDIT("MESSAGE_PUSH_EDIT", "编辑触达", EntityType.MESSAGE_PUSH),
    MESSAGE_PUSH_DELETE("MESSAGE_PUSH_DELETE", "删除触达", EntityType.MESSAGE_PUSH),
    MESSAGE_PUSH("MESSAGE_PUSH", "消息推送", EntityType.MESSAGE_PUSH),


    // 用户提现相关
    ADD_WITHDRAW("ADD_WITHDRAW", "新增提现", EntityType.WITHDRAW),
    AUDIT_WITHDRAW("AUDIT_WITHDRAW", "审核提现", EntityType.WITHDRAW),

    // 订单支付成功
    ORDER_CREATE_SUCCESS("ORDER_CREATE_SUCCESS", "订单创建成功", EntityType.ORDER),
    ORDER_PAY_SUCCESS("ORDER_PAY_SUCCESS", "订单支付成功", EntityType.ORDER),
    ORDER_CANCEL_SUCCESS("ORDER_CANCEL_SUCCESS", "订单取消成功", EntityType.ORDER),

    // 积分变更事件
    CREDITS_CHANGE("CREDITS_CHANGE", "积分变更", EntityType.CREDITS),
    ;

    private final String actionName;
    private final String describe;
    private final EntityType entityType;

    EventAction(String actionName, String describe, EntityType entityType) {
        this.actionName = actionName;
        this.describe = describe;
        this.entityType = entityType;
    }

    public String getActionName() {
        return actionName;
    }

    public String getDescribe() {
        return describe;
    }

    public EntityType getEntityType() {
        return entityType;
    }
}
